import { createApp } from 'vue'
import router from './route'
import store from './store'
import ElementPlus from 'element-plus'
import * as ElIcons from '@element-plus/icons'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import './assets/style/common.scss'
import './assets/style/element_self.scss'
import svgIconRegistered from '@/utils/svg-component'
import '@/assets/style/theme/theme.css' // 主题

import App from '@/App.vue'
import MD from './model/MD'
// bpmn 相关依赖
import 'bpmn-js/dist/assets/diagram-js.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css'

// 左边工具栏以及编辑节点的样式
import 'bpmn-js-properties-panel/dist/assets/bpmn-js-properties-panel.css'

// 瀑布流布局
import { VueMasonryPlugin } from 'vue-masonry'

// VUE:UI
const app = createApp(App)



app.config.warnHandler = () => null;
// svg Sprites图
svgIconRegistered(app)
for (const name in ElIcons) {
    app.component(name, (ElIcons as any)[name])
}
// UI组件库
app.use(ElementPlus, {
    locale: zhCn,
}).use(store).use(router).use(VueMasonryPlugin).mount('#app')

app.config.warnHandler = () => null;
MD.__init__();